﻿namespace WMS6.Web
{
    using System;
    using System.Collections.Generic;
    using System.Data;
    using System.Web;
    using WMS6.Web.OutboundService2Ref;

    public class OutboundService2ClientProxy : BasePage
    {
        public string ConfirmShippingReviewByOrderID(List<OrdersInfo> orderList)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            string result = string.Empty;
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                result = client.ConfirmShippingReviewByOrderID(orderList, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return result;
        }

        public string CreatedWaveByWaveTemplate(string waveTemplateID)
        {
            string strTemp = string.Empty;
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                strTemp = client.CreatedWaveByWaveTemplate(waveTemplateID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return strTemp;
        }

        public string DeleteLoadDetailInfo(string loadID, List<string> lineID)
        {
            string strTemp = string.Empty;
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                strTemp = client.DeleteLoadDetailInfo(loadID, lineID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return strTemp;
        }

        public string DeleteLoadInfo(List<string> loadID)
        {
            string strTemp = string.Empty;
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                strTemp = client.DeleteLoadInfo(loadID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return strTemp;
        }

        public string DeleteVanning(List<string> vanningID)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            string result = string.Empty;
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                result = client.DeleteVanning(vanningID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return result;
        }

        public string DeleteVanningContainer(string vanningID, List<string> containerID)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            string result = string.Empty;
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                result = client.DeleteVanningContainer(vanningID, containerID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return result;
        }

        public string DeleteWaveFlowDetailInfo(List<string> waveFlowID, List<string> lineID)
        {
            string strTemp = string.Empty;
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                strTemp = client.DeleteWaveFlowDetailInfo(waveFlowID, lineID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return strTemp;
        }

        public string DeleteWaveFlowInfo(List<string> waveFlowID)
        {
            string strTemp = string.Empty;
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                strTemp = client.DeleteWaveFlowInfo(waveFlowID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return strTemp;
        }

        public string DeleteWaveTemplate(List<string> IDS)
        {
            string strTemp = string.Empty;
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                strTemp = client.DeleteWaveTemplate(IDS, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return strTemp;
        }

        public List<OrderDetailInfo> GetBatchOrdersInfoAndDetailListByID(string waveID, string ContainerID)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            List<OrderDetailInfo> ordersDetailList = new List<OrderDetailInfo>();
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                ordersDetailList = client.GetBatchOrdersInfoAndDetailListByID(waveID, ContainerID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ordersDetailList;
        }

        public static OutboundService2ClientProxy GetInstance()
        {
            return new OutboundService2ClientProxy();
        }

        public LoadHeaderInfo GetLoadByID(string loadID)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            LoadHeaderInfo loadHeaderInfo = null;
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                loadHeaderInfo = client.GetLoadByID(loadID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return loadHeaderInfo;
        }

        public DataSet GetLoadByQueryEntity(LoadHeaderQueryEntity loadHeaderQueryEntity)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            DataSet ds = null;
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                ds = client.GetLoadByQueryEntity(loadHeaderQueryEntity, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public List<OrdersInfo> GetShippingReviewByOrderID(string orderID, string shippingReviewType)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            List<OrdersInfo> ordersInfoList = null;
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                ordersInfoList = client.GetShippingReviewByOrderID(orderID, shippingReviewType, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ordersInfoList;
        }

        public List<string> GetUnPrintShippingPickDetailIDByOrderID(string orderID)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            string updatedBy = base.UserInfo.UserID;
            List<string> stringList = null;
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                stringList = client.GetUnPrintShippingPickDetailIDByOrderID(orderID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return stringList;
        }

        public VanningInfo GetVanningByID(string vanningID)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            VanningInfo vanningInfo = null;
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                vanningInfo = client.GetVanningByID(vanningID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return vanningInfo;
        }

        public List<VanningDetailInfo> GetVanningDetailByID(string vanningID, string containerID)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            List<VanningDetailInfo> vanningDetailList = new List<VanningDetailInfo>();
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                vanningDetailList = client.GetVanningDetailByID(vanningID, containerID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return vanningDetailList;
        }

        public DataSet GetVanningInfoByQueryEntity(VanningQueryEntity vanningQueryEntity)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            DataSet ds = null;
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                ds = client.GetVanningInfoByQueryEntity(vanningQueryEntity, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public List<WaveFlowDetailInfo> GetWaveFlowDetailInfoByID(string waveFlowID)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            List<WaveFlowDetailInfo> waveFlowDetailInfoList = new List<WaveFlowDetailInfo>();
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                waveFlowDetailInfoList = client.GetWaveFlowDetailInfoByID(waveFlowID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return waveFlowDetailInfoList;
        }

        public WaveFlowDetailInfo GetWaveFlowDetailInfoByIDLineID(string waveFlowID, string lineID)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            WaveFlowDetailInfo waveFlowDetailInfo = null;
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                waveFlowDetailInfo = client.GetWaveFlowDetailInfoByIDLineID(waveFlowID, lineID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return waveFlowDetailInfo;
        }

        public WaveFlowInfo GetWaveFlowInfoByID(string waveFlowID)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            WaveFlowInfo waveFlowInfo = null;
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                waveFlowInfo = client.GetWaveFlowInfoByID(waveFlowID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return waveFlowInfo;
        }

        public DataSet GetWaveFlowInfoByQueryEntity(WaveFlowQueryEntity waveFlowQueryEntity)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            DataSet ds = null;
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                ds = client.GetWaveFlowInfoByQueryEntity(waveFlowQueryEntity, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public WaveTemplateInfo GetWaveTemplateByID(string id)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            WaveTemplateInfo waveTemplateInfo = null;
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                waveTemplateInfo = client.GetWaveTemplateByID(id, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return waveTemplateInfo;
        }

        public DataSet GetWaveTemplateByQueryList(WaveTemplateQueryEntity waveQuery)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            DataSet ds = null;
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                ds = client.GetWaveTemplateByQueryList(waveQuery, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        private PubParasInfo InitPubParasInfo()
        {
            if (base.UserInfo != null)
            {
                return new PubParasInfo { UserID = base.UserInfo.UserID, UserLanguage = base.UserInfo.Preference.Lang, CurrentWH = base.UserInfo.CurrentWH };
            }
            HttpContext.Current.Response.Redirect("../Login.aspx?from=Logout", true);
            return null;
        }

        public string InsertLoadDetailInfo(string orderID, string loadID, string lineID)
        {
            string strTemp = string.Empty;
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                strTemp = client.InsertLoadDetailInfo(orderID, loadID, lineID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return strTemp;
        }

        public string InsertLoadInfo(LoadHeaderInfo loadHeaderInfo)
        {
            string strTemp = string.Empty;
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                strTemp = client.InsertLoadInfo(loadHeaderInfo, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return strTemp;
        }

        public string InsertVanning(VanningInfo vanningInfo)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            string result = string.Empty;
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                result = client.InsertVanning(vanningInfo, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return result;
        }

        public string InsertVanningDetail(List<VanningDetailInfo> vanningDetailList)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            string result = string.Empty;
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                result = client.InsertVanningDetail(vanningDetailList, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return result;
        }

        public string InsertWaveFlowDetailInfo(WaveFlowDetailInfo waveFlowDetailInfo)
        {
            string strTemp = string.Empty;
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                strTemp = client.InsertWaveFlowDetailInfo(waveFlowDetailInfo, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return strTemp;
        }

        public string InsertWaveFlowInfo(WaveFlowInfo waveFlowInfo)
        {
            string strTemp = string.Empty;
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                strTemp = client.InsertWaveFlowInfo(waveFlowInfo, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return strTemp;
        }

        public string InsertWaveTemplate(WaveTemplateInfo obj)
        {
            string strTemp = string.Empty;
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                strTemp = client.InsertWaveTemplate(obj, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return strTemp;
        }

        public List<OrderDetailInfo> PreviewWaveByWaveTemplate(string waveTemplateID)
        {
            List<OrderDetailInfo> orderList = new List<OrderDetailInfo>();
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                orderList = client.PreviewWaveByWaveTemplate(waveTemplateID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return orderList;
        }

        public string ShippedByOrderLineQty(string orderID, List<string> orderLineIDs, List<decimal> qtys, string shippDate)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            string updatedBy = base.UserInfo.UserID;
            string result = string.Empty;
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                result = client.ShippedByOrderLineQty(orderID, orderLineIDs, qtys, shippDate, updatedBy, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return result;
        }

        public string ShippingCarriersAssigned(List<string> orderID)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            string updatedBy = base.UserInfo.UserID;
            string result = string.Empty;
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                result = client.ShippingCarriersAssigned(orderID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return result;
        }

        public string UpdateLoadAndOrderStatusByLoadID(string status, string loadID)
        {
            string strTemp = string.Empty;
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                strTemp = client.UpdateLoadAndOrderStatusByLoadID(status, loadID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return strTemp;
        }

        public string UpdateLoadInfo(LoadHeaderInfo loadHeaderInfo)
        {
            string strTemp = string.Empty;
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                strTemp = client.UpdateLoadInfo(loadHeaderInfo, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return strTemp;
        }

        public string UpdateOrderStatusByOrderID(List<string> orderIDList, string ordersStatus, string operators, DateTime operatingDate, string abnormal, string handling, List<string> lineID, List<decimal> numberLost)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            string result = string.Empty;
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                result = client.UpdateOrderStatusByOrderID(orderIDList, ordersStatus, operators, operatingDate, abnormal, handling, lineID, numberLost, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return result;
        }

        public string UpdateVanning(VanningInfo vanningInfo)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            string result = string.Empty;
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                result = client.UpdateVanning(vanningInfo, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return result;
        }

        public string UpdateVanningDetail(List<VanningDetailInfo> vanningDetailList)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            string result = string.Empty;
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                result = client.UpdateVanningDetail(vanningDetailList, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return result;
        }

        public string UpdateWaveFlowDetailInfo(WaveFlowDetailInfo waveFlowDetailInfo)
        {
            string strTemp = string.Empty;
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                strTemp = client.UpdateWaveFlowDetailInfo(waveFlowDetailInfo, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return strTemp;
        }

        public string UpdateWaveFlowInfo(WaveFlowInfo waveFlowInfo)
        {
            string strTemp = string.Empty;
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                strTemp = client.UpdateWaveFlowInfo(waveFlowInfo, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return strTemp;
        }

        public string UpdateWaveTemplate(WaveTemplateInfo obj)
        {
            string strTemp = string.Empty;
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                strTemp = client.UpdateWaveTemplate(obj, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return strTemp;
        }

        public string waveOrderActions(string waveID, List<string> orderID, List<string> orderLineID, string waveOrderType)
        {
            string strTemp = string.Empty;
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                strTemp = client.waveOrderActions(waveID, orderID, orderLineID, waveOrderType, pubParasInfo.UserID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return strTemp;
        }

        public string WaveReleasePickTasks(List<string> waveID, string userID)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            string updatedBy = base.UserInfo.UserID;
            string result = string.Empty;
            OutboundService2Client client = new OutboundService2Client("WSHttpBinding_IOutboundService2");
            try
            {
                result = client.WaveReleasePickTasks(waveID, userID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return result;
        }
    }
}

